package com.m3958.logcollector.repository;

import java.util.List;

import javax.persistence.EntityManager;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.support.JpaEntityInformation;
import org.springframework.data.jpa.repository.support.JpaEntityInformationSupport;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;

import com.fasterxml.jackson.databind.JsonNode;
import com.m3958.logcollector.datacommons.util.AllParams;
import com.m3958.logcollector.datacommons.util.KeyAndCount;
import com.m3958.logcollector.domain.Role;


public class RoleRepositoryImpl extends SimpleJpaRepository<Role, Long>  implements RoleRepositoryCustom, ApplicationContextAware {

    @SuppressWarnings("unused")
    private EntityManager entityManager;

    @SuppressWarnings("unused")
    private ApplicationContext context;

    @SuppressWarnings("unused")
    private final JpaEntityInformation<Role, ?> entityInformation;
    
    @Autowired
    public RoleRepositoryImpl(EntityManager entityManager) {
        super(Role.class, entityManager);
        this.entityManager = entityManager;
        this.entityInformation = JpaEntityInformationSupport.getEntityInformation(Role.class, entityManager);
    }
    
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.context = applicationContext;
    }
    
    /* (non-Javadoc)
     * @see com.m3958.datacommons.repository.M3958DataRepository#findQ(com.m3958.datacommons.utils.AllParams, org.springframework.data.domain.Pageable)
     */
    @Override
    public Page<Role> findQ(AllParams arg0, Pageable arg1) {
        return null;
    }

    /* (non-Javadoc)
     * @see com.m3958.datacommons.repository.M3958DataRepository#keyAndCount(com.m3958.datacommons.utils.AllParams)
     */
    @Override
    public List<KeyAndCount> keyAndCount(AllParams arg0) {
        return null;
    }

    /* (non-Javadoc)
     * @see com.m3958.datacommons.repository.M3958DataRepository#updateByPayload(com.fasterxml.jackson.databind.JsonNode, java.lang.Long)
     */
    @Override
    public Role updateByPayload(JsonNode arg0, Long arg1) {
        return null;
    }

}
